package com.qujia.customer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qujia.customer.mapper.CustomerGradeSettingMapper;
import com.qujia.customer.domain.CustomerGradeSetting;
import com.qujia.customer.service.ICustomerGradeSettingService;

/**
 * 客户优惠等级设置Service业务层处理
 * 
 * @author qujia
 * @date 2021-01-08
 */
@Service
public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingService 
{
    @Autowired
    private CustomerGradeSettingMapper customerGradeSettingMapper;

    /**
     * 查询客户优惠等级设置
     * 
     * @param id 客户优惠等级设置ID
     * @return 客户优惠等级设置
     */
    @Override
    public CustomerGradeSetting selectCustomerGradeSettingById(Long id)
    {
        return customerGradeSettingMapper.selectCustomerGradeSettingById(id);
    }

    /**
     * 查询客户优惠等级设置列表
     * 
     * @param customerGradeSetting 客户优惠等级设置
     * @return 客户优惠等级设置
     */
    @Override
    public List<CustomerGradeSetting> selectCustomerGradeSettingList(CustomerGradeSetting customerGradeSetting)
    {
        return customerGradeSettingMapper.selectCustomerGradeSettingList(customerGradeSetting);
    }

    /**
     * 新增客户优惠等级设置
     * 
     * @param customerGradeSetting 客户优惠等级设置
     * @return 结果
     */
    @Override
    public int insertCustomerGradeSetting(CustomerGradeSetting customerGradeSetting)
    {
        return customerGradeSettingMapper.insertCustomerGradeSetting(customerGradeSetting);
    }

    /**
     * 修改客户优惠等级设置
     * 
     * @param customerGradeSetting 客户优惠等级设置
     * @return 结果
     */
    @Override
    public int updateCustomerGradeSetting(CustomerGradeSetting customerGradeSetting)
    {
        return customerGradeSettingMapper.updateCustomerGradeSetting(customerGradeSetting);
    }

    /**
     * 批量删除客户优惠等级设置
     * 
     * @param ids 需要删除的客户优惠等级设置ID
     * @return 结果
     */
    @Override
    public int deleteCustomerGradeSettingByIds(Long[] ids)
    {
        return customerGradeSettingMapper.deleteCustomerGradeSettingByIds(ids);
    }

    /**
     * 删除客户优惠等级设置信息
     * 
     * @param id 客户优惠等级设置ID
     * @return 结果
     */
    @Override
    public int deleteCustomerGradeSettingById(Long id)
    {
        return customerGradeSettingMapper.deleteCustomerGradeSettingById(id);
    }

}
